Python identity operator
The identity operator is used to compare the storage units of two objects
The following example demonstrates the operation of all Python identity operators:
#!/usr/bin/pythona = 20b = 20if (A is b): print "line
Member operatorsPython has a member operator that can determine whether an element is in a sequence. For example, you can tell if a character belongs to the string, you can tell if an object is in the list, and so on.The syntax for using member
I believe everyone remembers a classic cartoon. A dog typed in front of a computer and said to another dog, "no one knows whether you are a dog or not on the Internet!" This cartoon shows that it is difficult to identify on the Internet.
Identity
This series of articles in the process of learning Python encountered a bottleneck, go to the Novice tutorial to experience the fun of Python, improve the overall knowledge framework. Enhance your understanding of the Python language and grasp the
Arithmetic operators
operator
Description
Example
+
Add-two Objects added
A + B output result 31
-
Minus-get negative numbers or one number minus the other
-b Output result-1
PythonoperatorThis section mainly describes the Python operators. To give a simple example 4 +5 = 9 . In the example,4 and 5 are called operands , and "+" is called an operator.The Python language supports the following types of operators:
The CLR provides the ability to differentiate between types of equality and identity.
L Equality: If two objects are of the same type, and they each have the same and equivalent attributes. (They are instances of the same type and if each of the
Operators are special symbols or phrases that check, change, merge values,Swift supports most of the standard C-language operators and improves many features to reduce general coding errors./*Such as: the assignment (=) does not return a value to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.